import com.wyl.pojo.Student
import com.wyl.pojo.User
import org.junit.Test
import org.springframework.beans.factory.getBean
import org.springframework.context.support.ClassPathXmlApplicationContext

class DiTest {
    @Test
    fun test() {
        val context = ClassPathXmlApplicationContext("beans.xml")
        val student = context.getBean<Student>("student")
        println(student)
    }

    @Test
    fun test2() {
        val context = ClassPathXmlApplicationContext("userbeans.xml")
        val user = context.getBean<User>("user")
        println(user)
    }
}